<template>
    <div class="content">
        <h1 class="text-center">项目部其它费用</h1>
        <el-row :gutter="20" class="mt30">
            <el-col :span="12">项目名称：{{ project.title }}</el-col>
            <el-col :span="12" class="text-right">合同完工期{{ project.end_date }}</el-col>
        </el-row>
        <el-table class="mt20" :data="tableData" :border="true" show-summary style="width: 100%">
            <el-table-column type="index" :index="indexMethod" label="序号" width="60" />
            <el-table-column prop="title" label="费用名称" />
            <el-table-column prop="price" label="价格" />
            <el-table-column prop="unit" label="单位" />
            <el-table-column prop="nums" label="数量" />
            <el-table-column prop="apply_price" label="合计" />
            <el-table-column prop="total" label="税率" show-overflow-tooltip />
            <el-table-column prop="total" label="税金" show-overflow-tooltip />
            <el-table-column prop="total" label="已支付" show-overflow-tooltip />
            <el-table-column prop="total" label="未支付费用" show-overflow-tooltip />
            <el-table-column prop="remarks" label="备注" />
        </el-table>
    </div>
</template>

<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import http from '../../../../util/request';
const indexMethod = (index: number) => {
  return index+= 1
}
const form = ref<any>({search:'',model:'Reimburse',status:'approved',page:0,current:0,total:10,limit:20,loading:false,parentBorder:false})
let project:any = sessionStorage.getItem('project')
project = JSON.parse(project)
const tableData = ref<any[]>([])

const onGetData = () => {
    
    form.value.loading = true
    http.post('/reimburse/cost',form.value).then((response:any)=>{
        form.value.loading = false
        tableData.value = response.data.data
    })
}

onMounted(()=>{
    onGetData()
})
</script>

<style scoped>

</style>